//
//  AdvertWebViewController.m
//  MyProject
//
//  Created by 石小强 on 2018/5/30.
//  Copyright © 2018年 yanjiaming. All rights reserved.
//

#import "AdvertWebViewController.h"

@interface AdvertWebViewController ()

@end

@implementation AdvertWebViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = self.advertModel.title;
    
    WS(weakSelf)
    [self showProgressWithView:self.view animated:YES];
    
    [SendRequest getAdvertisementDetailsWithAdvertisementId:self.advertModel.advertisementId result:^(NSDictionary *result, NSError *error) {
        [weakSelf hideProgress:self.view animated:YES];
        
        result = [CommonUtils decryptDicWithResult:result];
        if([result[@"result"] integerValue] == 1) {
            SaintiLog(@"广告详情 = %@", [result objectForKey:@"data"]);
            
            [weakSelf.webView loadHTMLString:[result objectForKey:@"data"] baseURL:nil];
        } else {
            [CommonUtils showToast:[result objectForKey:@"msg"]];
        }
    }];
}



@end
